<template>
	<view>
		<scroll-view scroll-y="true"  class="product" :style="{height:searchHeight+'px'}">
			<view v-for="(item,index) in classList" :key="index" class="product-list" @tap="classTap(item)">
				<image :src="item.icon" mode="widthFix"></image>
				<text>{{item.name}}</text>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		props:{
			searchHeight:{
				type:Number
			},
			classList:{
				type:Array
			}
		},
		data() {
			return {
			};
		},
		methods:{
			classTap(item){
				uni.navigateTo({
					url: '/pageB/classify/classProduct?name='+item.name+'&id='+item.id
				})
			}
		}
	}
</script>

<style lang="less">
	.product-list{
		width: 100%;
		padding:0 30upx;
		box-sizing: border-box;
		margin-bottom: 30upx;
		image{
			width: 100%;
			border-radius: 10px;
		}
		text{
			display: block;
			text-align: center;
			font-size: 28upx;
			color: #333333;
			line-height: 40upx;
		}
	}
</style>
